package com.whxy02.tolearn.app.beans;

//import javax.persistence.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 试卷表（保留）
 */


//@Entity
//@Table(name="tb_exam")
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_exam")
public class Exam {
//    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(value = "exam_id",type = IdType.AUTO)
    private Integer examId;
    private Integer tagsId=1;                //标签
    private String title="无";
    private Date createTime=new Date();        //发布日期
    private String analysis;                   //url
    private String grade="未知";               //学年(保留)
    private String level="普通";                  //难度
    private Integer subjectId=1;             //科目
    private Integer stars=0;         //收藏数
    private String questionId;

    @TableField(exist = false)
    private String subject;
    @TableField(exist = false)
    private String tags;
    @TableField(exist = false)
    private Date collectionTime;

    public Exam setSubject(String subject){
        this.subject=subject;
        return this;
    }

    public Exam setTags(String tags){
        this.tags=tags;
        return this;
    }
    public Exam setCollectionTime(Date date){
        this.collectionTime=date;
        return this;
    }

}
